﻿<ion-view view-title="首页" cache-view="false" onload="load()" ng-init="init()"  hide-back-button="true">
  <ion-nav-buttons side="left">
    <button class="button" ng-click="toggleMenu()">{{currentProvince.val}}</button>
    <i class="ion-ios-arrow-down" style="margin-top:7px"/>
  </ion-nav-buttons>

  <ion-side-menus delegate-handle="provincemenu">
    <ion-side-menu-content style="padding-top:{{topsize || 44}}px">
      <section class="g_main" ng-click="showtest()">
        <!-- 顶部轮播广告 -->
        <ion-slide-box auto-play="true" show-pager="true" does-continue="true" slide-interval=2000>
          <ion-slide ng-repeat="item in bannerList track by $index">
            <img ng-src="{{item.pic_url}}" ng-click="openurl($index)" width="100%" height="150px"/>
          </ion-slide>
        </ion-slide-box>
        <!-- 首页导航区域 -->
        <section class="home_nav">
          <ul>
            <li ng-click="findvinchel()">
              <a>
                线上找车
              </a>
            </li>
            <li ng-click="findship()">
              <a>
                线上找船
              </a>
            </li>
            <li ng-click="findline()">
              <a>
                专线运输
              </a>
            </li>
            <li ng-click="tocorplist()" style="display: none">
              <a>
                物流公司
              </a>
            </li>
            <li data-url="lichengjisuan.html" ng-click="toWayBill()" >
              <a>
                我的运单
              </a>
            </li>
          </ul>
        </section>
        <!-- 最新动态 -->
        <section class="news" ng-if="recommendList && recommendList.length">
          <h2 ng-click="findline()">
            推荐线路
          </h2>
          <ion-scroll style="height:{{scorllHeight}}px" delegate-handle="recommendlistscroll">
          <ul>
            <li ng-repeat="item in recommendList" ng-click="toLineDetail('{{item.line_pub_id}}')" style="height: 83px">
              <img ng-src="{{item.photo_url}}" alt="">
              <h3>
                {{item.corp_name}}
              </h3>
              <div class="direction" style="height:21px">
                <span>
                  {{item.start_area_disp}}
                </span>
                <i class="icon icon_goAndTo">
                  往返
                </i>
                <span>
                  {{item.end_area_disp}}
                </span>
              </div>
            </li>
          </ul>
          </ion-scroll>
          <a class="more_link">
            更多 &gt;
          </a>
        </section>
        <ul ng-show="offline">
          <li class="item ion-wifi" style="border: none;color: #CCC;text-align: center;font-size: 80px;padding-top: 2px;padding-bottom: 2px;">
          </li>
        </ul>
        <button ng-show="offline" class="btn_save" ng-click="retry()">重试</button>
      </section>
    </ion-side-menu-content>
    <ion-side-menu side="left">
      <ion-content>
        <section class="g_main">
          <!-- 认证列表 -->
          <section class="cert_guide_list">
            <ul>
              <li ng-repeat="(key, val) in provinces" ng-class="className[key]" ng-click="chooseProvince('{{key}}', '{{val}}')">{{val}}</li>
            </ul>
          </section>
        </section>
      </ion-content>
    </ion-side-menu>
  </ion-side-menus>
  <footer class="g_footer">
    <section class="foot_menu">
      <ul>
        <li class="m_index current" ng-click="toHome()"><a class='openwebview'>首页</a></li>
        <li class="m_find" ng-click="toFind()"><a class='openwebview'>发现</a></li>
        <li class="m_find" ng-click="toCar()"><a class='openwebview'>车源信息</a></li>
        <li class="m_find" ng-click="toship()"><a class='openwebview'>船源信息</a></li>
        <li class="m_list" ng-click="tochatList()"><a class='openwebview'>对话</a></li>
        <li class="m_my" ng-click="toMine()"><a class='openwebview'>我</a></li>
      </ul>
    </section>
  </footer>
</ion-view>
